package com.jiang.service.Impl;

import com.jiang.bean.Teacher;
import com.jiang.dao.TeaDao;
import com.jiang.service.TeaService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TeaServiceImpl implements TeaService {

    @Resource
    private TeaDao teaDao;


    @Override
    public int getTeaCount(String name) {
        return teaDao.getTeaCount(name);
    }

    @Override
    public List<Teacher> getAllTea(String name, int pageStart, int pageSize) {
        return teaDao.getAllTea(name,pageStart,pageSize);
    }

    @Override
    public int addTea(Teacher teacher) {
        return teaDao.addTea(teacher);
    }

    @Override
    public int deleteTea(int id) {
        return teaDao.deleteTea(id);
    }

    @Override
    public int updataTea(Teacher teacher) {
        return teaDao.updataTea(teacher);
    }

    @Override
    public Teacher getUpdataTea(int id) {
        return teaDao.getUpdataTea(id);
    }

    @Override
    public Teacher selectBynum(String numno) {
        return teaDao.selectBynum(numno);
    }
}
